﻿@model Home.Site.Models.DataLayer.PhotoAlbum
@{
    ViewBag.Title = Model.NameAlbum;
    ViewBag.Description = Model.NameAlbum;
}
@section head
{
    <script src="~/Scripts/thumbnailGridExpandingPreview/js/modernizr.custom.js"></script>
    <link href="~/Scripts/thumbnailGridExpandingPreview/css/default.css" rel="stylesheet" />
    <link href="~/Scripts/thumbnailGridExpandingPreview/css/component.css" rel="stylesheet" />
}
<div class="container">
    <div class="main">
        <ul id="og-grid" class="og-grid">
            @{
                foreach (var item in Model.Photos.Where(p => p.Visible))
                {
                    var imageName = @item.PhotoAlbum.NameAlbum + @"/" + @item.PhysicalName.Remove(@item.PhysicalName.IndexOf('.'));
                    var image = @String.Format("/Files/{0}/1920x1200/{1}", imageName, @item.PhysicalName);
                    var imageTh = @String.Format("/Files/{0}/320x240/{1}", imageName, @item.PhysicalName);
                <li>
                    <a href="@imageName" data-largesrc="@image" data-title="@item.FileName" data-description="@item.DatePublish.ToShortDateString()">
                        <img src="@imageTh" alt="@item.FileName" />
                    </a>
                </li>
                }
            }
        </ul>
    </div>
</div>
@section Scripts
{
    <script src="@Url.Content("~/Scripts/thumbnailGridExpandingPreview/js/grid.js")"></script>
    <script> $(function() { Grid.init(); }); </script>
}
